/*
 * UnitDamaged.h
 *
 *  Created on: 2008/10/18
 *      Author: Ryan Cobb
 */

#ifndef UNITDAMAGED_H_
#define UNITDAMAGED_H_

#include "GameEvent.h"

namespace OOInterface
{

class UnitDamaged: public OOInterface::GameEvent
{
public:
	UnitDamaged( ConstUnitPtr damaged, ConstUnitPtr damager, float amount) : _unit( damaged ), _damagedBy(damager), _damageAmount( amount ){}
	virtual ~UnitDamaged() {}

	ConstUnitPtr getUnitDamaged() const { return _unit; }
	void setUnitDamaged( ConstUnitPtr unit ) { _unit = unit; }

	ConstUnitPtr getDamageDealtBy() const { return _damagedBy; }
	void setDamageDealer( ConstUnitPtr unit ) { _damagedBy = unit; }

	float damageAmountDone() const { return _damageAmount; }
	void setDamageAmount( float damage ) { _damageAmount = damage; }

	virtual std::string toString() const{ return std::string("Event: Unit Damaged."); }
private:
	ConstUnitPtr _unit;
	ConstUnitPtr _damagedBy;
	float _damageAmount;
};

}

#endif /* UNITDAMAGED_H_ */
